[Ivy]
[>Created: Tue Jul 01 17:35:14 ICT 2014]
146EB90AF60928DA 3.17 #module
>Proto >Proto Collection #zClass
Ms0 MailMainProcess Big #zClass
Ms0 RD #cInfo
Ms0 #process
Ms0 @TextInP .ui2RdDataAction .ui2RdDataAction #zField
Ms0 @TextInP .rdData2UIAction .rdData2UIAction #zField
Ms0 @TextInP .resExport .resExport #zField
Ms0 @TextInP .type .type #zField
Ms0 @TextInP .processKind .processKind #zField
Ms0 @AnnotationInP-0n ai ai #zField
Ms0 @TextInP .xml .xml #zField
Ms0 @TextInP .responsibility .responsibility #zField
Ms0 @RichDialogInitStart f0 '' #zField
Ms0 @RichDialogInitStart f3 '' #zField
Ms0 @RichDialogMethodStart f5 '' #zField
Ms0 @GridStep f6 '' #zField
Ms0 @PushWFArc f7 '' #zField
Ms0 @RichDialogProcessEnd f8 '' #zField
Ms0 @PushWFArc f9 '' #zField
Ms0 @RichDialogMethodStart f12 '' #zField
Ms0 @RichDialogMethodStart f13 '' #zField
Ms0 @GridStep f14 '' #zField
Ms0 @RichDialogProcessEnd f15 '' #zField
Ms0 @RichDialogProcessEnd f16 '' #zField
Ms0 @GridStep f17 '' #zField
Ms0 @PushWFArc f18 '' #zField
Ms0 @PushWFArc f19 '' #zField
Ms0 @PushWFArc f20 '' #zField
Ms0 @PushWFArc f21 '' #zField
Ms0 @RichDialogProcessEnd f1 '' #zField
Ms0 @PushWFArc f2 '' #zField
Ms0 @PushWFArc f4 '' #zField
Ms0 @RichDialogMethodStart f10 '' #zField
Ms0 @GridStep f11 '' #zField
Ms0 @RichDialogProcessEnd f22 '' #zField
Ms0 @PushWFArc f23 '' #zField
Ms0 @PushWFArc f24 '' #zField
Ms0 @RichDialogMethodStart f25 '' #zField
Ms0 @GridStep f26 '' #zField
Ms0 @RichDialogProcessEnd f27 '' #zField
Ms0 @PushWFArc f28 '' #zField
Ms0 @PushWFArc f29 '' #zField
>Proto Ms0 Ms0 MailMainProcess #zField
Ms0 f0 guid 146EB90AF6B8CA1B #txt
Ms0 f0 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f0 method start() #txt
Ms0 f0 disableUIEvents true #txt
Ms0 f0 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<> param = methodEvent.getInputArguments();
' #txt
Ms0 f0 outParameterDecl '<> result;
' #txt
Ms0 f0 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>start()</name>
    </language>
</elementInfo>
' #txt
Ms0 f0 22 78 20 20 13 0 #rect
Ms0 f0 @|RichDialogInitStartIcon #fIcon
Ms0 f3 guid 146EBF28E79426FE #txt
Ms0 f3 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f3 method startWithoutLogin(ch.ivyteam.ivy.security.IUser) #txt
Ms0 f3 disableUIEvents true #txt
Ms0 f3 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<ch.ivyteam.ivy.security.IUser loggedUser> param = methodEvent.getInputArguments();
' #txt
Ms0 f3 outParameterDecl '<> result;
' #txt
Ms0 f3 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>startWithoutLogin(IUser)</name>
    </language>
</elementInfo>
' #txt
Ms0 f3 142 78 20 20 13 0 #rect
Ms0 f3 @|RichDialogInitStartIcon #fIcon
Ms0 f5 guid 146EC77288D677B2 #txt
Ms0 f5 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f5 method showDraftMails() #txt
Ms0 f5 disableUIEvents false #txt
Ms0 f5 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<> param = methodEvent.getInputArguments();
' #txt
Ms0 f5 outParameterDecl '<> result;
' #txt
Ms0 f5 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>showDraftMails()</name>
    </language>
</elementInfo>
' #txt
Ms0 f5 510 70 20 20 13 0 #rect
Ms0 f5 @|RichDialogMethodStartIcon #fIcon
Ms0 f6 actionDecl 'ch.soreco.training.mail.MailMain.MailMainData out;
' #txt
Ms0 f6 actionTable 'out=in;
' #txt
Ms0 f6 actionCode 'import javax.faces.component.FacesComponent;
import mailApplication.Mail;
import java.util.ArrayList;
import ch.ivyteam.ivy.environment.Ivy;
import entity.MailData;
import javax.faces.context.FacesContext;

	ivy.log.error(FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("mailData") == null);
	
	FacesContext fc = FacesContext.getCurrentInstance();
	MailData mailData = fc.getApplication().evaluateExpressionGet(fc, "#{mailData}", MailData.class) as MailData;
	
	ivy.log.error(#mailData == null);
		
	if(#mailData != null) {
		in.mailList = mailData.getDraftMail();
		in.inboxCount = mailData.getInboxMail().size();
		in.draftCount = mailData.getDraftMail().size();
		in.deletedCount = mailData.getDeletedMail().size();
	}
		in.selectedMail = null;' #txt
Ms0 f6 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f6 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>showDraftMail</name>
        <nameStyle>13,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f6 502 156 36 24 20 -2 #rect
Ms0 f6 @|StepIcon #fIcon
Ms0 f7 expr out #txt
Ms0 f7 520 90 520 156 #arcP
Ms0 f8 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f8 510 270 20 20 13 0 #rect
Ms0 f8 @|RichDialogProcessEndIcon #fIcon
Ms0 f9 expr out #txt
Ms0 f9 520 180 520 270 #arcP
Ms0 f12 guid 146F01A764677927 #txt
Ms0 f12 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f12 method showInbox() #txt
Ms0 f12 disableUIEvents false #txt
Ms0 f12 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<> param = methodEvent.getInputArguments();
' #txt
Ms0 f12 outParameterDecl '<> result;
' #txt
Ms0 f12 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>showInbox()</name>
    </language>
</elementInfo>
' #txt
Ms0 f12 366 70 20 20 13 0 #rect
Ms0 f12 @|RichDialogMethodStartIcon #fIcon
Ms0 f13 guid 146F01A82F02FBEA #txt
Ms0 f13 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f13 method showDeletedItems() #txt
Ms0 f13 disableUIEvents false #txt
Ms0 f13 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<> param = methodEvent.getInputArguments();
' #txt
Ms0 f13 outParameterDecl '<> result;
' #txt
Ms0 f13 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>showDeletedItems()</name>
    </language>
</elementInfo>
' #txt
Ms0 f13 662 70 20 20 13 0 #rect
Ms0 f13 @|RichDialogMethodStartIcon #fIcon
Ms0 f14 actionDecl 'ch.soreco.training.mail.MailMain.MailMainData out;
' #txt
Ms0 f14 actionTable 'out=in;
' #txt
Ms0 f14 actionCode 'import javax.faces.component.FacesComponent;
import mailApplication.Mail;
import java.util.ArrayList;
import ch.ivyteam.ivy.environment.Ivy;
import entity.MailData;
import javax.faces.context.FacesContext;

	ivy.log.error(FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("mailData") == null);
	
	FacesContext fc = FacesContext.getCurrentInstance();
	MailData mailData = fc.getApplication().evaluateExpressionGet(fc, "#{mailData}", MailData.class) as MailData;
	
	ivy.log.error(#mailData == null);
		
	if(#mailData != null) {
		in.mailList = mailData.getInboxMail();
		in.inboxCount = mailData.getInboxMail().size();
		in.inboxCount = mailData.getInboxMail().size();
		in.draftCount = mailData.getDraftMail().size();
		in.deletedCount = mailData.getDeletedMail().size();	
	}
	in.selectedMail = null;' #txt
Ms0 f14 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f14 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>showInbox</name>
        <nameStyle>9,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f14 358 156 36 24 20 -2 #rect
Ms0 f14 @|StepIcon #fIcon
Ms0 f15 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f15 366 270 20 20 13 0 #rect
Ms0 f15 @|RichDialogProcessEndIcon #fIcon
Ms0 f16 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f16 662 270 20 20 13 0 #rect
Ms0 f16 @|RichDialogProcessEndIcon #fIcon
Ms0 f17 actionDecl 'ch.soreco.training.mail.MailMain.MailMainData out;
' #txt
Ms0 f17 actionTable 'out=in;
' #txt
Ms0 f17 actionCode 'import javax.faces.component.FacesComponent;
import mailApplication.Mail;
import java.util.ArrayList;
import ch.ivyteam.ivy.environment.Ivy;
import entity.MailData;
import javax.faces.context.FacesContext;

	ivy.log.error(FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("mailData") == null);
	
	FacesContext fc = FacesContext.getCurrentInstance();
	MailData mailData = fc.getApplication().evaluateExpressionGet(fc, "#{mailData}", MailData.class) as MailData;
	
	ivy.log.error(#mailData == null);
		
	if(#mailData != null) {
		in.mailList = mailData.getDeletedMail();
		in.inboxCount = mailData.getInboxMail().size();
		in.draftCount = mailData.getDraftMail().size();
		in.deletedCount = mailData.getDeletedMail().size();
	}
		in.selectedMail = null;' #txt
Ms0 f17 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f17 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>showDeletedItem</name>
        <nameStyle>15,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f17 654 156 36 24 20 -2 #rect
Ms0 f17 @|StepIcon #fIcon
Ms0 f18 expr out #txt
Ms0 f18 672 90 672 156 #arcP
Ms0 f19 expr out #txt
Ms0 f19 672 180 672 270 #arcP
Ms0 f20 expr out #txt
Ms0 f20 376 90 376 156 #arcP
Ms0 f21 expr out #txt
Ms0 f21 376 180 376 270 #arcP
Ms0 f1 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f1 86 310 20 20 13 0 #rect
Ms0 f1 @|RichDialogProcessEndIcon #fIcon
Ms0 f2 expr out #txt
Ms0 f2 34 97 93 310 #arcP
Ms0 f2 0 0.49999999999999994 0 0 #arcLabel
Ms0 f4 expr out #txt
Ms0 f4 149 97 98 310 #arcP
Ms0 f4 0 0.5000000000000001 0 0 #arcLabel
Ms0 f10 guid 146F11F475B88547 #txt
Ms0 f10 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f10 method deleteMail(Long) #txt
Ms0 f10 disableUIEvents false #txt
Ms0 f10 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<java.lang.Long id> param = methodEvent.getInputArguments();
' #txt
Ms0 f10 inParameterMapAction 'out.id=param.id;
' #txt
Ms0 f10 outParameterDecl '<> result;
' #txt
Ms0 f10 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>deleteMail(Long)</name>
        <nameStyle>16,5,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f10 838 70 20 20 13 0 #rect
Ms0 f10 @|RichDialogMethodStartIcon #fIcon
Ms0 f11 actionDecl 'ch.soreco.training.mail.MailMain.MailMainData out;
' #txt
Ms0 f11 actionTable 'out=in;
' #txt
Ms0 f11 actionCode 'import javax.faces.component.FacesComponent;
import mailApplication.Mail;
import java.util.ArrayList;
import ch.ivyteam.ivy.environment.Ivy;
import entity.MailData;
import javax.faces.context.FacesContext;

	ivy.log.error(FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("mailData") == null);
	
	FacesContext fc = FacesContext.getCurrentInstance();
	MailData mailData = fc.getApplication().evaluateExpressionGet(fc, "#{mailData}", MailData.class) as MailData;
	
	ivy.log.error(mailData.getInboxMail().size());
		
	if(#mailData != null) {
		mailData.removeMail(in.id);
		in.inboxCount = mailData.getInboxMail().size();
		in.draftCount = mailData.getDraftMail().size();
		in.deletedCount = mailData.getDeletedMail().size();
	}

 for (Mail mail : in.mailList) {
            if (mail.getId().equals(in.id)) {
                in.mailList.remove(mail);
                break;
            }
        }
	if(in.#selectedMail !=null &&in.selectedMail.id == in.id){
		in.selectedMail = null;
		}' #txt
Ms0 f11 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f11 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>deleteMail</name>
        <nameStyle>10,7
</nameStyle>
    </language>
</elementInfo>
' #txt
Ms0 f11 831 156 34 24 20 -2 #rect
Ms0 f11 @|StepIcon #fIcon
Ms0 f22 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f22 838 270 20 20 13 0 #rect
Ms0 f22 @|RichDialogProcessEndIcon #fIcon
Ms0 f23 expr out #txt
Ms0 f23 848 90 848 156 #arcP
Ms0 f24 expr out #txt
Ms0 f24 848 180 848 270 #arcP
Ms0 f24 0 0.5000000000000001 0 0 #arcLabel
Ms0 f25 guid 146F177193CA718A #txt
Ms0 f25 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f25 method getNumberOfEmail() #txt
Ms0 f25 disableUIEvents false #txt
Ms0 f25 inParameterDecl 'ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent methodEvent = event as ch.ivyteam.ivy.richdialog.exec.RdMethodCallEvent;
<> param = methodEvent.getInputArguments();
' #txt
Ms0 f25 outParameterDecl '<> result;
' #txt
Ms0 f25 @C|.xml '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<elementInfo>
    <language>
        <name>getNumberOfEmail()</name>
    </language>
</elementInfo>
' #txt
Ms0 f25 1022 70 20 20 13 0 #rect
Ms0 f25 @|RichDialogMethodStartIcon #fIcon
Ms0 f26 actionDecl 'ch.soreco.training.mail.MailMain.MailMainData out;
' #txt
Ms0 f26 actionTable 'out=in;
' #txt
Ms0 f26 actionCode 'import javax.faces.component.FacesComponent;
import mailApplication.Mail;
import java.util.ArrayList;
import ch.ivyteam.ivy.environment.Ivy;
import entity.MailData;
import javax.faces.context.FacesContext;

	ivy.log.error(FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("mailData") == null);
	
	FacesContext fc = FacesContext.getCurrentInstance();
	MailData mailData = fc.getApplication().evaluateExpressionGet(fc, "#{mailData}", MailData.class) as MailData;
	
		
	if(!fc.isPostback() && #mailData != null) {
		in.mailList = mailData.getDeletedMail()		;
		in.inboxCount = mailData.getInboxMail().size();
		in.draftCount = mailData.getDraftMail().size();
		in.deletedCount = mailData.getDeletedMail().size();
	}' #txt
Ms0 f26 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f26 1014 156 36 24 20 -2 #rect
Ms0 f26 @|StepIcon #fIcon
Ms0 f27 type ch.soreco.training.mail.MailMain.MailMainData #txt
Ms0 f27 1022 270 20 20 13 0 #rect
Ms0 f27 @|RichDialogProcessEndIcon #fIcon
Ms0 f28 expr out #txt
Ms0 f28 1032 90 1032 156 #arcP
Ms0 f29 expr out #txt
Ms0 f29 1032 180 1032 270 #arcP
>Proto Ms0 .type ch.soreco.training.mail.MailMain.MailMainData #txt
>Proto Ms0 .processKind HTML_DIALOG #txt
>Proto Ms0 -8 -8 16 16 16 26 #rect
>Proto Ms0 '' #fIcon
Ms0 f5 mainOut f7 tail #connect
Ms0 f7 head f6 mainIn #connect
Ms0 f6 mainOut f9 tail #connect
Ms0 f9 head f8 mainIn #connect
Ms0 f13 mainOut f18 tail #connect
Ms0 f18 head f17 mainIn #connect
Ms0 f17 mainOut f19 tail #connect
Ms0 f19 head f16 mainIn #connect
Ms0 f12 mainOut f20 tail #connect
Ms0 f20 head f14 mainIn #connect
Ms0 f14 mainOut f21 tail #connect
Ms0 f21 head f15 mainIn #connect
Ms0 f0 mainOut f2 tail #connect
Ms0 f2 head f1 mainIn #connect
Ms0 f3 mainOut f4 tail #connect
Ms0 f4 head f1 mainIn #connect
Ms0 f10 mainOut f23 tail #connect
Ms0 f23 head f11 mainIn #connect
Ms0 f11 mainOut f24 tail #connect
Ms0 f24 head f22 mainIn #connect
Ms0 f25 mainOut f28 tail #connect
Ms0 f28 head f26 mainIn #connect
Ms0 f26 mainOut f29 tail #connect
Ms0 f29 head f27 mainIn #connect
